import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网: WY6 合唱团
 * <a href="https://www.nowcoder.com/practice/661c49118ca241909add3a11c96408c8?tpId=122&tqId=33652&ru=/exam/oj">...</a>
 * User: DELL
 * Date: 2023-05-19
 * Time: 13:08
 */
public class Main {
    /**
     * 解题思路: (动态规划)
     *
     * @param args
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] ability = new int[n];
        for (int i = 0; i < n; i++) {
            ability[i] = scanner.nextInt();
        }
        int k = scanner.nextInt();
        int d = scanner.nextInt();
        //动态规划
        long[][] dpMax = new long[n+1][k+1];
        long[][] dpMin = new long[n+1][k+1];
        //初始化
        for (int i = 1; i <= n; i++) {
            dpMax[i][1] = ability[0];
            dpMin[i][1] = ability[0];
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= k; j++) {
                for (int m = Math.max(i-k,1); m < i; m++) {

                }
            }
        }
    }
}
